package spectrum;

import edu.wpi.first.wpilibj.DoubleSolenoid;
//import edu.wpi.first.wpilibj.Relay;
import edu.wpi.first.wpilibj.DoubleSolenoid.*;
import edu.wpi.first.wpilibj.Relay.*;
import edu.wpi.first.wpilibj.can.*;

/**
 * @author 
 */
public class Teleop {


    public static void init() {
        HW.encoderStart();
        HW.compressor.start();
       
    }

    public static void periodic() {
        try {
            
          
          
          HW.Jag1.setX(-1 * HW.driveStickLeft.getY() );
          HW.Jag3.setX(HW.Jag1.getX() );
          HW.Jag2.setX(HW.driveStickRight.getY() );
          HW.Jag4.setX(HW.Jag2.getX() );
          
         
          
          if (HW.driveStickLeft.getTrigger() == true){
              HW.sol_1.set(DoubleSolenoid.Value.kForward);
              utilities.Utils.debugPrintln("ACTUATOR EXTEND");
          }
          else {
              HW.sol_1.set(DoubleSolenoid.Value.kReverse);
          }
          
          //utilities.Utils.debugPrintln("Jag1: " + HW.Jag1.get());
          //utilities.Utils.debugPrintln("Left_Encoder: " + HW.left_encoder.get());
          utilities.Utils.debugPrintln("Total Distance Traveled: " + HW.left_encoder.getDistance());
      } catch (CANTimeoutException e1) {
          // TODO Auto-generated catch block
          e1.printStackTrace();
      }
    }

    public static void continuous() {

    }
    
 
}
